/**
 * SystemMarshalling.java
 * ************************** 
 * @date Apr 18, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package infrastructureAPI.backendGate;

import java.net.InetAddress;

import infrastructureAPI.APIMessages.RequestMessage;
import infrastructureAPI.algorithms.APIFunction;

/**
 * Description:
 * The RequestMarshalling interface defines the method used
 * to marshal requests that will be sent by a 
 * cloud user from the Front-End to the Back-End of the system.
 * In order to marshal a request the developer has to 
 * provide the function of: the address of the machine,
 * the name of the local node and the APIFunction. 
 *  
 *
 */
public interface RequestMarshalling {
	
	/**
	 * Function able to marshal into a RequestMessage the feature
	 * implemented by the inputed APIFunction, from the local node
	 * specified by its name running into the machine addressed by
	 * its address.
	 * 
	 * @param localAddress : InetAddress
	 * @param localNodeName : String
	 * @param apiFunc : APIFunction
	 * @return requestMsg : RequestMessage
	 */
	public RequestMessage marshalRequest(InetAddress localAddress, 
			String localNodeName, APIFunction apiFunc);

}
